package jmine.tec.persist.hibernate.initializer.domain;

import java.util.ArrayList;
import java.util.List;

import javax.persistence.DiscriminatorValue;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.OneToMany;

/**
 * @author wellington.santos
 * @created May 29, 2012
 */
@Entity
@DiscriminatorValue("2")
public class DiscriminatedChildEntity2 extends DiscriminatedParentEntity {

    private List<DiscriminatedParentEntity> list = new ArrayList<DiscriminatedParentEntity>();

    /**
     * @return list
     */
    @OneToMany(fetch = FetchType.LAZY, mappedBy = "association")
    @JoinColumn(name = "COD_ASSOC")
    public List<DiscriminatedParentEntity> getCollection() {
        return this.list;
    }

    /**
     * @param list list
     */
    public void setCollection(List<DiscriminatedParentEntity> list) {
        this.list = list;
    }
    
}
